Skip to content

Parse Claude and Cursor session records separately - #35623

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b49328d46ab4937e3c599588a3d3081e8ab798cd
Jul 27, 2026
Merged

Parse Claude and Cursor session records separately#35623
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/b49328d46ab4937e3c599588a3d3081e8ab798cd

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 27, 2026

Copy link
Copy Markdown

Parse Claude and Cursor session records separately

Why

Cursor session messages can place <cursor_commands> and <timestamp> context
before the actual <user_query>. Treating both external session formats with one
parser left that context in the imported message and generated title.

What changed

  • Route detected sessions through format-specific Claude and Cursor parsers.
  • Strip recognized Cursor context wrappers when extracting a trailing
    <user_query>, while preserving messages with unknown leading context.
  • Keep shared content-block, tool-call, and timestamp parsing in a common module.

Testing

Add parser coverage for wrapped Cursor queries, unknown context, working-directory
precedence, Claude metadata, content hashing, and shared tool annotations.

## Why

Cursor session messages can place `<cursor_commands>` and `<timestamp>` context
before the actual `<user_query>`. Treating both external session formats with one
parser left that context in the imported message and generated title.

## What changed

- Route detected sessions through format-specific Claude and Cursor parsers.
- Strip recognized Cursor context wrappers when extracting a trailing
  `<user_query>`, while preserving messages with unknown leading context.
- Keep shared content-block, tool-call, and timestamp parsing in a common module.

## Testing

Add parser coverage for wrapped Cursor queries, unknown context, working-directory
precedence, Claude metadata, content hashing, and shared tool annotations.

GitOrigin-RevId: b49328d46ab4937e3c599588a3d3081e8ab798cd
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b49328d46ab4937e3c599588a3d3081e8ab798cd branch from d888e48 to bd2de42 Compare July 27, 2026 14:33
@copyberry
copyberry Bot merged commit bd2de42 into main Jul 27, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b49328d46ab4937e3c599588a3d3081e8ab798cd branch July 27, 2026 14:34
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 27, 2026
@imih
imih temporarily deployed to issue-triage July 27, 2026 15:25 — with GitHub Actions Inactive
@imih
imih temporarily deployed to issue-triage July 27, 2026 15:25 — with GitHub Actions Inactive
@imih
imih temporarily deployed to issue-triage July 27, 2026 15:25 — with GitHub Actions Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.